<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态绑定 class 的错误写法</title>
    <style>
        .textdecorated {
            text-decoration: underline;
        }

        .colordecorated {
            color: red;
        }
    </style>
</head>
<body>
<div id="app">
    <h1 class="textdecorated">Hello, World!</h1>

    <!--  无效的原因：使用的标识符一定是 JavaScript 定义的标识符，不能是其它  -->
    <h1 :class="textdecorated">Hello, World!</h1>

    <h1 :class="textDecoration">Hello, World!</h1>


</div>
<script>
    import {createApp} from "../../../../../js/vue.esm-browser.js";

    const app = createApp({
        setup() {
            return {
                textDecoration: "textdecorated",

            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>